<!DOCTYPE html>
<html>
<head>
    <title>垃圾分类识别系统</title>
</head>
<body>
    <h1>垃圾分类识别系统</h1>
    
    <form method="post" enctype="multipart/form-data">
        <input type="file" name="file" accept=".jpg,.jpeg,.png">
        <button type="submit">上传识别</button>
    </form>
    
    {% if filename %}
    <div>
        <h2>识别结果</h2>
        <img src="{{ url_for('static', filename='uploads/' + filename) }}" width="300">
        <p>预测类别: {{ predicted_class }}</p>
        <p>准确度: {{ confidence|round(2) }}</p>
    </div>
    {% endif %}
</body>
</html>